<extend name = "Common/baseView"/>
<block name="body">
    <!-- 内容主体区域 -->
    <div id="personinfo" style="padding: 10px;">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
            <legend>基本资料</legend>
        </fieldset>
        <div class="layui-row">
            <div class="layui-col-md5  layui-col-md-offset3">
                <table class="layui-table" lay-even lay-skin="nob" lay-size="lg">
                    <colgroup>
                        <col width="150">
                        <col width="150">
                        <col width="150">
                    </colgroup>
                    <!--<thead>
                    <tr>
                        <th>项目</th>
                        <th>信息</th>
                    </tr>
                    </thead>-->
                    <tbody >
                    <tr></tr>
                    <tr>
                        <td>登录账号：</td>
                        <td>{$info['account']}</td>
                    </tr>
                    <tr>
                        <td>登录时间：</td>
                        <td>{$Think.session.time}</td>
                    </tr>
                    <tr>
                        <td>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：</td>
                        <td>{$info['name']}</td>
                    </tr>
                    <tr>
                        <td>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：</td>
                        <td>
                            <switch name="info['sex']">
                                <case value="1">
                                    男
                                </case>
                                <case value="2">
                                   女
                                </case>
                                <default />{$info['sex']}
                            </switch>
                        </td>
                    </tr>
                    <tr>
                        <td>邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱：</td>
                        <td>{$info['email']}</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <button class="layui-btn  layui-btn-normal" style="border-radius: 10px;margin-left: 80%;" lay-submit="" id="edit" lay-filter="demo1">编辑</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>

    </div>
</block>
<block name="js">
    <script>
        layui.use('element', function () {
            var element = layui.element;
        });
        var edit = document.getElementById('edit');
        edit.addEventListener('click',function(){
            $.ajax({
//                type:'get',
                url:'{:U("editPersonInfo")}',
//                data:'is_ajax=1&search='+search.value,
                success:function(res){
                    $('#personinfo').html(res);
                }
            });
        });

    </script>
</block>